﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// get_tuicon 的摘要说明
/// </summary>
public class get_tuicon
{
	public get_tuicon()
	{
		//
		// TODO: 在此处添加构造函数逻辑
		//
	}
    #region cookies顺序
    public const int Savesta = 0;
    #endregion


    #region 查看cookies个人信息，无cookie返回"-1";
    /// <summary>
    /// 示例
    /// </summary>
    /// <example> 
    /// string strCookie = MediaUtil.ReturnInfo(MediaUtil.UID);  //取用户名
    /// string strCookie = MediaUtil.ReturnInfo(MediaUtil.UIDX); //取用户IDX
    /// </example>
    /// <returns>字符串类型</returns>
    public static string ReturnInfo(int num)
    {
        HttpCookie cookie1 = HttpContext.Current.Request.Cookies["usetui"];

        if (cookie1 == null)
        {
            return "-1";
        }
        else
        {
            string str1 = cookie1.Value;
            string[] strcookie = str1.Split(',');
            string value = strcookie[num].ToString();
            if (value == "false")
                value = "";
            return value;
        }
    }
    #endregion

    #region  查看cookies，配置公聊信息
    public static string Getsta()
    {
        string strCookie = ReturnInfo(Savesta);
        if (strCookie == "-1")
        {
            //HttpContext.Current.Response.End();
            return "";

        }

        else
            return strCookie;

    }
    #endregion





}
